calculates the area of a rectangle